<!DOCTYPE html>
<html>
<head>

    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <link rel="stylesheet" type="text/css" href="../css/bootstrap.css">
    <link rel="stylesheet" type="text/css" href="../css/bootstrap/easyui.css">

    <link rel="stylesheet" type="text/css" href="../css/icon.css">
    <link rel="stylesheet" type="text/css" href="../css/demo.css">

    <script type="application/javascript" src="../js/jquery/1.8.3/jquery.min.js"></script>
    <script type="text/javascript" src="../js/jquery.easyui.min.js"></script>
    <script type="text/javascript" src="../js/bootstrap.min.js"></script>
    <script type="text/javascript" src="../js/jquery.element.js"></script>

</head>
<body>
<div id="cc">
    <div data-options="region:'north'" style="height:80px">
        <h1>资源服务器管理后台
            <small>例子模板</small>

        <div class="pull-right">
            <p>
                <button class="btn btn-default navbar-btn" type="button"><span class="glyphicon glyphicon-envelope"></span></button>
                <button class="btn btn-default navbar-btn" type="button"><span class="glyphicon glyphicon-tasks"> Info <span class="badge">1</span></span></button>
                <button class="btn btn-default navbar-btn" type="button">
                    <span class="glyphicon glyphicon-user"></span> Sign in
                </button>
            </p>
        </div>
        </h1>
    </div>
    <div data-options="region:'south'" style="height:30px;">south</div>
    <div data-options="region:'west',split:true" title="菜单" style="width:150px;">
        <div id="menuBar"></div>
    </div>
    <div data-options="region:'center',title:'内容'">conter</div>
</div>
<script type="text/javascript">

    var template_Menu = {
        views: ["menu"],
        views_menu: {
            target: "#menuBar",
            belongTo:"east",
            class: "accordion",
            html: {},
            options: {
                fit : true,
                width:180
            }
        }
    }

    function initComponents(options) {
        if (typeof(options.views) == "undefined") {
            return false;
        }
        $.each(options.views,function(i,data){
            var compOption = {};
            $.extend(compOption,options["views_"+data]);
            console.info("print Component~!");
            console.log(compOption);
            console.info("print jquery node~!");
            console.log( $(compOption.target));
           // $(compOption.target).addClass(compOption.class);

            $(compOption.target)[compOption.class](compOption.options);
         //   $.parser.parse(compOption.target);
            console.info("print jquery node~!2")
            console.log( $(compOption.target));

            $(compOption.target)[compOption.class]('add', {
                title: '学校',
                content: 'content',
                selected: false
            });


        });
    }
    $(document).ready(function () {
        var height = $(document.body).outerHeight(true);

        $("#cc").layout({
            fit: true
        });
        initComponents(template_Menu);
        /*
        $("#menuBar").addClass("easyui-accordion");
        $("#menuBar").html();
        var menu = $("#cc").layout("panel", "west");

        menu.load("menu.html", function () {
            $.parser.parse();
        });

        $('#xx').affix({
            offset: {
                top: 100, bottom: function () {
                    return (this.bottom = $('.bs-footer').outerHeight(true))
                }
            }
        })
        */

        //console.log(menu);
    });
</script>
</body>
</html>